import envConfig from "./src/static/env"
export default {
  // env: https://www.nuxtjs.cn/api/configuration-env
  env: {
    ...envConfig
  },
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: '需求管理平台',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // srcDir: https://www.nuxtjs.cn/api/configuration-srcdir
  srcDir: "src/",

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'element-ui/lib/theme-chalk/index.css',
    '@/assets/style/index.scss'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/element-ui',
    '@/plugins/axios'
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  /**
   * 新增组件文件夹需要配置到components中，nuxt回全局加载组件，不用在组件中引入
   */
  components: [
    "@/components",
    "@/components/index"
  ],

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [

  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/axios',
    ['nuxt-vuex-localstorage', {
      localStorage: ["index","todos"],  //  If not entered, “localStorage” file is the default value
      // sessionStorage: ["index"]  //  If not entered, “sessionStorage” file is the default value
    }]
  ],

  // axios: https://axios.nuxtjs.org/options
  axios:{

  },

  router:{
    middleware:['router-middleware']
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
  }
}
